package com.hinnotek.amoeba.repo

import com.hinnotek.amoeba.api.ApiService
import com.hinnotek.amoeba.base.BaseBean
import com.hinnotek.amoeba.bean.old.AmibaPayByAmibaPayIdBean
import com.hinnotek.amoeba.bean.old.RDProjectDetailBean
import com.lee.common.base.BaseRepository
import com.lee.common.network.net.StateLiveData
import okhttp3.RequestBody
import javax.inject.Inject

class ProjectRepo @Inject constructor(private val service: ApiService): BaseRepository() {


    suspend fun addCompanyProjectDistribution(body: RequestBody, stateLiveData: StateLiveData<BaseBean>) {
        executeResp({ service.addCompanyProjectDistribution(body) }, stateLiveData)
    }

    suspend fun addAmibaProject(body: RequestBody, stateLiveData: StateLiveData<BaseBean>) {
        executeResp({ service.addAmibaProject(body) }, stateLiveData)
    }

    suspend fun getAmibaProjectById(amibaProjectId: Int, stateLiveData: StateLiveData<RDProjectDetailBean>) {
        executeResp({ service.getAmibaProjectById(amibaProjectId) }, stateLiveData)
    }
}